package cn.jaye.fabric.controller.rest;

import cn.jaye.fabric.application.ChainCodeApplicationService;
import cn.jaye.fabric.application.ChannelApplicationService;
import com.alibaba.fastjson.JSON;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by Administrator on 2018/5/27.
 */
@RestController
@RequestMapping("channel")
public class ChannelControlller {

    @Autowired
    private ChannelApplicationService channelApplicationService;

    @PostMapping("list")
    public String list() {
        return JSON.toJSONString(channelApplicationService.list());
    }
}
